﻿using System.Data;
using BookTheBook.Data.NameDefinitions;
using Migrator.Framework;

namespace BookTheBook.Migrations
{
    [Migration(2)]
    public class _002_NewTableUser : Migration
    {
        public override void Up()
        {
            Database.AddTable(TableNames.User,
                              new Column(ColumnNames.UserId, DbType.Int32, ColumnProperty.PrimaryKeyWithIdentity),
                              new Column(ColumnNames.Login, DbType.String, ColumnProperty.NotNull));
        }

        public override void Down()
        {
            Database.RemoveTable(TableNames.User);
        }
    }
}
